package main

import (
	"encoding/json"
	"fmt"
	"log"
)

type Account struct {
	Email    string
	password string
	Money    float64
}

/**
参考：https://www.jianshu.com/p/f3c2105bd06b
*/
func main() {
	account := Account{
		Email:    "rsj217@gmail.com",
		password: "123456",
		Money:    100.5,
	}

	rs, err := json.Marshal(account)
	if err != nil {
		log.Fatalln(err)
	}

	fmt.Println("rs binary:", rs)
	fmt.Println("rs:", string(rs))
}
